﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/pages/Menu.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="admin_pages_comentario_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titulo" Runat="Server">
    Comentário
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Pagina" Runat="Server">

    <div class="magin-auto cadastro">
        <fieldset>
            <legend><label>Lista de Categoria de Produto</label></legend>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
                    BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                    DataKeyNames="ID" DataSourceID="EntityDataSource1" 
                    onselectedindexchanged="SelectGrid"
                     GridLines="None" Width="100%">
                    <Columns>
                        <asp:BoundField DataField="Name" HeaderText="Nome" SortExpression="Name" />
                        <asp:BoundField DataField="Txt" HeaderText="Comentário" SortExpression="Txt" />
                        <asp:CheckBoxField DataField="Permission" HeaderText="Aprovado" SortExpression="Permission"
                            Text="Aprovado" />
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>

                                <asp:LinkButton ID="LinkButton1" runat="server" ToolTip="Editar" CausesValidation="False" 
                                    CommandName="Select"  >
                                    <asp:Image ID="Image1" runat="server" BorderWidth="0px" ImageUrl="~/admin/css/images/iconEdit.png"/>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton2" runat="server" CssClass="sem_borda" CausesValidation="False" 
                                    CommandName='<%# Eval("ID") %>'
                                    OnCommand="Deletar" 
                                    OnClientClick='<%# Eval("ID", "return confirm(\"Deseja mesmo apagar o registro?\")") %>'>
                                     <asp:Image ID="Image2" runat="server"  BorderWidth="0px" ImageUrl="~/admin/css/images/icon_excluir.png"/>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <PagerStyle CssClass="PagerStyle" HorizontalAlign="Center" />
                    <RowStyle CssClass="RowStyle" /> 
                    <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                    <EditRowStyle CssClass="EditRowStyle" />
                    <AlternatingRowStyle CssClass="AltRowStyle" />
                    <SortedAscendingCellStyle BackColor="#FEFCEB" />
                    <SortedAscendingHeaderStyle BackColor="#AF0101" />
                    <SortedDescendingCellStyle BackColor="#F6F0C0" />
                    <SortedDescendingHeaderStyle BackColor="#7E0000" />
                </asp:GridView>
                <div class="voltar">
                    <asp:LinkButton ID="lkVoltar" runat="server" CssClass="texto_cinza" PostBackUrl="~/admin/pages/Default.aspx">home</asp:LinkButton>
                </div>
            </fieldset>
        </div>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=guedesEntities" DefaultContainerName="guedesEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="coments" EntityTypeFilter="coments">
    </asp:EntityDataSource>
</asp:Content>

